package pile.pay.service.impl;

import pile.pay.entity.ChargingGoldConfig;
import pile.pay.mapper.ChargingGoldConfigMapper;
import pile.pay.params.chargingGoldConfig.QueryDTO;
import pile.pay.service.IChargingGoldConfigService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import pile.pay.entity.ResponseResult;
import org.springframework.beans.factory.annotation.Autowired;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import pile.pay.utils.WebUtils;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import pile.pay.entity.PageList;
import org.apache.commons.lang.StringUtils;
import java.util.Arrays;
import pile.pay.params.chargingGoldConfig.DeleDTO;
import pile.pay.params.chargingGoldConfig.ListDTO;
/**
 * <p>
 * 充电金配置表 服务实现类
 * </p>
 *
 * @author 郭天义
 * @since 2024-06-29
 */
@Service
public class ChargingGoldConfigServiceImpl extends ServiceImpl<ChargingGoldConfigMapper, ChargingGoldConfig> implements IChargingGoldConfigService {

    @Autowired
    private ChargingGoldConfigMapper chargingGoldConfigMapper;

    /**
     * 根据电站ID 和充值查询唯一一个充电金活动配置
     * @param queryDTO
     * @return
     */
    @Override
    public ChargingGoldConfig selectGiveAwayAmount(QueryDTO queryDTO) {
        ChargingGoldConfig chargingGoldConfig = chargingGoldConfigMapper.selectGiveAwayAmount(queryDTO);
        return chargingGoldConfig;
    }
}
